Exclude sites from Dynamic SharePoint and Microsoft Teams drives

If your mapping configuration includes a Dynamic: SharePoint and/or Dynamic: Microsoft Teams drive, you can now control which SharePoint sites, subsites or Microsoft Teams channels are mapped to these drive types. Doing so will allow CDM to reduce the possibility of throttling and improve its performance effectively.

To inform CDM about the desired exclusions, you will need a text file that lists SharePoint sites and subsites to exclude and subsites within excluded sites to include in the mapped drive. Use the following format in the text file to specify what to exclude or include:

Each entry should be on a new line. Use Exclude: to hide a site and everything under it recursively (sites, subsites, sub-subsites, and document libraries). Use Except: to allow very specific paths to be included, overriding Exclude: but only for that exact path.

Once you’ve created this text file, save it at a location of your choice (network share or local path), provided that CDM has access to it for your end-users. After saving this file, you can deploy the site exclusion key to your organization's computers (via Group Policy) or specific users (via Group Policy or Microsoft Intune).

Excluding sites from a Dynamic: SharePoint drive

Let’s assume you have Site 1, Subsite 1, Subsubsite 1, and another subsite within Subsubsite 1. You want to exclude Site 1 from being mapped to a Dynamic: SharePoint drive, but not Subsubsite 1. In this scenario, you’ll need to include the following information in the text file to specify what to exclude and/or include in the mapped drive:

Exclude:https://yourdomain.sharepoint.com/sites/Site1
Except:https://yourdomain.sharepoint.com/sites/Site1/Subsite1/Subsubsite1

Before honoring exclusions and exceptions, CDM will also consider the folder structure type (Flat or Hierarchy) specified for the drive. The following table shows how CDM will apply the specified exclusions and exceptions to the mapped drive:

URL Flat Hierarchy Doc libraries returned? Explanation
https://yourdomain.sharepoint.com/sites/Site1 Hidden Visible None Directly excluded
https://yourdomain.sharepoint.com/sites/Site1/Subsite1 Hidden Visible None Still excluded
https://yourdomain.sharepoint.com/sites/Site1/Subsite1/Subsubsite1 Visible Visible Returned Exact Except: match
https://yourdomain.sharepoint.com/sites/Site1/Subsite1/Subsubsite1/Sub subsubsite1 Hidden Hidden None Deeper than Except: not included
https://yourdomain.sharepoint.com/sites/Site1/Another subsite Hidden Hidden None Covered by Exclude: rule
https://yourdomain.sharepoint.com/sites/Site1/Subsite1/Other subsubsite Hidden Hidden None Also covered by Exclude: rule

Excluding sites from a Dynamic: Microsoft Teams drive

Let’s assume you have two Microsoft Teams sites (Teams-connected SharePoint sites) called Team A and Team B, and Team A includes a private channel. You want to exclude Team A from being mapped to the Dynamic: Microsoft Teams drive, but not the private channel within Team A. You also want to exclude the General channel in Team B from your Dynamic: Microsoft Teams drive. In this scenario, you’ll need to include the following information in the text file to specify what to exclude and/or include in the mapped drive:

Except:https://yourdomain.sharepoint.com/sites/TeamA-PrivateChannel1/Shared%20Documents/Private%20Channel%20Docs
Exclude:https://yourdomain.sharepoint.com/sites/TeamB/Shared%20Documents/General
Exclude:https://yourdomain.sharepoint.com/sites/TeamA

URL Hidden Visible Explanation
https://yourdomain.sharepoint.com/sites/TeamA Yes No Directly excluded
https://yourdomain.sharepoint.com/sites/TeamA-PrivateChannel1/Shared%20Documents/Private%20Channel%20Docs No Yes Exact Except: match
https://yourdomain.sharepoint.com/sites/TeamB/Shared%20Documents/General Yes No Covered by Exclude: rule
https://yourdomain.sharepoint.com/sites/TeamA/Shared Documents/General Yes No Also covered by Exclude: rule

Related topics:

Deploy the site exclusion key to computers via Group Policy

Deploy the site exclusion key for users via Group Policy

Deploy the site exclusion key for users via Microsoft Intune